<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:bm="http://localhost:8080/customTags">

    <rich:popupPanel id="deleteProductPanel" autosized="true" width="200" modal="true">
            <f:facet name="header">
                <h:outputText value="Delete this product from list?"
                              style="padding-right:15px;" />
            </f:facet>
            <f:facet name="controls">
                <h:outputLink value="#" onclick="#{rich:component('deleteProductPanel')}.hide(); return false;">
                <h:graphicImage value="/images/modal/close.png" id="hidelink_delete" styleClass="hidelink" style="border:0" />
            </h:outputLink>
            </f:facet>
            <h:form>
                <table width="100%">
                    <tbody>
                        <tr>
                            <td align="center" width="50%"><a4j:commandButton value="Yes" action="#{productController.inactivate}"
                                                                              oncomplete="#{rich:component('deleteProductPanel')}.hide();"
                                                                              reRender="productsTable" /></td>
                            <td align="center" width="50%"><a4j:commandButton
                                    value="Cancel"
                                    onclick="#{rich:component('deleteProductPanel')}.hide();return false;" />
                            </td>
                        </tr>
                    </tbody>
                </table>
            </h:form>
        </rich:popupPanel>
</ui:composition>